using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Common.Utilities.Dispatcher;
using Workflows.Components.TextMining.Properties;

namespace Workflows.Components.TextMining.FullTextSearch
{
    [Serializable]
    public class NearestNeighborIndexComponent:WorkflowComponentBase
    {
        private NearestNeighborIndexInstruction _Instruction;
        private NearestNeighborIndexOutput _Output;

        public override InstructionBase Instruction
        {
            get { return _Instruction; }
            set { _Instruction = (NearestNeighborIndexInstruction) value; }
        }

        public override ResultBase Output
        {
            get { return _Output; }
            set { _Output = (NearestNeighborIndexOutput) value; }
        }

        public NearestNeighborIndexComponent():base()
        {
            this.ComponentActivityType = WorkflowActivityType.SimpleActivity;
            this.ComponentCategory = WorkflowComponentCategory.TextMining.ToString();
            this.ComponentIcon = Resources.adobe;
            this.ComponentImage = Resources.Form;
            this.ComponentName = "NN indexer";
            this.Description =
                "index full text files/fields using tf-idf methods";

            this._Instruction=new NearestNeighborIndexInstruction(this.ComponentID,Guid.Empty,new CorpusProvider());
            this._Output = new NearestNeighborIndexOutput(this.ComponentID, Guid.Empty, string.Empty, string.Empty);

        }

        public override XmlNode Serialize(ref XmlDocument xDoc, ref XmlNode parentNode)
        {
            XmlNode xNode = base.Serialize(ref xDoc, ref parentNode);

            return xNode;
        }

        public override WorkflowComponentBase Instantiate(XmlNode xNode)
        {
            throw new NotImplementedException();
        }
    }
}
